package demo1;

/**
 * 观察者抽象.
 *
 * @author GongXincheng
 * @since 2019-09-23 13:40
 */
abstract class BaseObserver {

    /**
     * 观察者的名称.
     */
    String name;

    /**
     * 抽象通知者.
     */
    BaseSubject subject;

    BaseObserver(String name, BaseSubject subject) {
        this.name = name;
        this.subject = subject;
    }

    /**
     * 收到通知所要进行的操作.
     */
    abstract void update();
}
